Optimal. Leaf size=101 \[ \frac{2 a (A+B) F\left (\left .\frac{1}{2} (c+d x)\right |2\right )}{3 d}+\frac{2 a (5 A+3 B) E\left (\left .\frac{1}{2} (c+d x)\right |2\right )}{5 d}+\frac{2 a (A+B) \sin (c+d x) \sqrt{\cos (c+d x)}}{3 d}+\frac{2 a B \sin (c+d x) \cos ^{\frac{3}{2}}(c+d x)}{5 d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.158298, antiderivative size = 101, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 6, integrand size = 31, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.194, Rules used = {2968, 3023, 2748, 2639, 2635, 2641} \[ \frac{2 a (A+B) F\left (\left .\frac{1}{2} (c+d x)\right |2\right )}{3 d}+\frac{2 a (5 A+3 B) E\left (\left .\frac{1}{2} (c+d x)\right |2\right )}{5 d}+\frac{2 a (A+B) \sin (c+d x) \sqrt{\cos (c+d x)}}{3 d}+\frac{2 a B \sin (c+d x) \cos ^{\frac{3}{2}}(c+d x)}{5 d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2968
Rule 3023
Rule 2748
Rule 2639
Rule 2635
Rule 2641
Rubi steps
\begin{align*} \int \sqrt{\cos (c+d x)} (a+a \cos (c+d x)) (A+B \cos (c+d x)) \, dx &=\int \sqrt{\cos (c+d x)} \left (a A+(a A+a B) \cos (c+d x)+a B \cos ^2(c+d x)\right ) \, dx\\ &=\frac{2 a B \cos ^{\frac{3}{2}}(c+d x) \sin (c+d x)}{5 d}+\frac{2}{5} \int \sqrt{\cos (c+d x)} \left (\frac{1}{2} a (5 A+3 B)+\frac{5}{2} a (A+B) \cos (c+d x)\right ) \, dx\\ &=\frac{2 a B \cos ^{\frac{3}{2}}(c+d x) \sin (c+d x)}{5 d}+(a (A+B)) \int \cos ^{\frac{3}{2}}(c+d x) \, dx+\frac{1}{5} (a (5 A+3 B)) \int \sqrt{\cos (c+d x)} \, dx\\ &=\frac{2 a (5 A+3 B) E\left (\left .\frac{1}{2} (c+d x)\right |2\right )}{5 d}+\frac{2 a (A+B) \sqrt{\cos (c+d x)} \sin (c+d x)}{3 d}+\frac{2 a B \cos ^{\frac{3}{2}}(c+d x) \sin (c+d x)}{5 d}+\frac{1}{3} (a (A+B)) \int \frac{1}{\sqrt{\cos (c+d x)}} \, dx\\ &=\frac{2 a (5 A+3 B) E\left (\left .\frac{1}{2} (c+d x)\right |2\right )}{5 d}+\frac{2 a (A+B) F\left (\left .\frac{1}{2} (c+d x)\right |2\right )}{3 d}+\frac{2 a (A+B) \sqrt{\cos (c+d x)} \sin (c+d x)}{3 d}+\frac{2 a B \cos ^{\frac{3}{2}}(c+d x) \sin (c+d x)}{5 d}\\ \end{align*}
Mathematica [C] time = 6.19786, size = 830, normalized size = 8.22 \[ a \left (\sqrt{\cos (c+d x)} (\cos (c+d x)+1) \left (-\frac{(5 A+3 B) \cot (c)}{5 d}+\frac{(A+B) \cos (d x) \sin (c)}{3 d}+\frac{B \cos (2 d x) \sin (2 c)}{10 d}+\frac{(A+B) \cos (c) \sin (d x)}{3 d}+\frac{B \cos (2 c) \sin (2 d x)}{10 d}\right ) \sec ^2\left (\frac{c}{2}+\frac{d x}{2}\right )-\frac{A (\cos (c+d x)+1) \csc (c) \left (\frac{\, _2F_1\left (-\frac{1}{2},-\frac{1}{4};\frac{3}{4};\cos ^2\left (d x+\tan ^{-1}(\tan (c))\right )\right ) \sin \left (d x+\tan ^{-1}(\tan (c))\right ) \tan (c)}{\sqrt{1-\cos \left (d x+\tan ^{-1}(\tan (c))\right )} \sqrt{\cos \left (d x+\tan ^{-1}(\tan (c))\right )+1} \sqrt{\cos (c) \cos \left (d x+\tan ^{-1}(\tan (c))\right ) \sqrt{\tan ^2(c)+1}} \sqrt{\tan ^2(c)+1}}-\frac{\frac{2 \cos \left (d x+\tan ^{-1}(\tan (c))\right ) \sqrt{\tan ^2(c)+1} \cos ^2(c)}{\cos ^2(c)+\sin ^2(c)}+\frac{\sin \left (d x+\tan ^{-1}(\tan (c))\right ) \tan (c)}{\sqrt{\tan ^2(c)+1}}}{\sqrt{\cos (c) \cos \left (d x+\tan ^{-1}(\tan (c))\right ) \sqrt{\tan ^2(c)+1}}}\right ) \sec ^2\left (\frac{c}{2}+\frac{d x}{2}\right )}{2 d}-\frac{3 B (\cos (c+d x)+1) \csc (c) \left (\frac{\, _2F_1\left (-\frac{1}{2},-\frac{1}{4};\frac{3}{4};\cos ^2\left (d x+\tan ^{-1}(\tan (c))\right )\right ) \sin \left (d x+\tan ^{-1}(\tan (c))\right ) \tan (c)}{\sqrt{1-\cos \left (d x+\tan ^{-1}(\tan (c))\right )} \sqrt{\cos \left (d x+\tan ^{-1}(\tan (c))\right )+1} \sqrt{\cos (c) \cos \left (d x+\tan ^{-1}(\tan (c))\right ) \sqrt{\tan ^2(c)+1}} \sqrt{\tan ^2(c)+1}}-\frac{\frac{2 \cos \left (d x+\tan ^{-1}(\tan (c))\right ) \sqrt{\tan ^2(c)+1} \cos ^2(c)}{\cos ^2(c)+\sin ^2(c)}+\frac{\sin \left (d x+\tan ^{-1}(\tan (c))\right ) \tan (c)}{\sqrt{\tan ^2(c)+1}}}{\sqrt{\cos (c) \cos \left (d x+\tan ^{-1}(\tan (c))\right ) \sqrt{\tan ^2(c)+1}}}\right ) \sec ^2\left (\frac{c}{2}+\frac{d x}{2}\right )}{10 d}-\frac{A (\cos (c+d x)+1) \csc (c) \, _2F_1\left (\frac{1}{4},\frac{1}{2};\frac{5}{4};\sin ^2\left (d x-\tan ^{-1}(\cot (c))\right )\right ) \sec \left (d x-\tan ^{-1}(\cot (c))\right ) \sqrt{1-\sin \left (d x-\tan ^{-1}(\cot (c))\right )} \sqrt{-\sqrt{\cot ^2(c)+1} \sin (c) \sin \left (d x-\tan ^{-1}(\cot (c))\right )} \sqrt{\sin \left (d x-\tan ^{-1}(\cot (c))\right )+1} \sec ^2\left (\frac{c}{2}+\frac{d x}{2}\right )}{3 d \sqrt{\cot ^2(c)+1}}-\frac{B (\cos (c+d x)+1) \csc (c) \, _2F_1\left (\frac{1}{4},\frac{1}{2};\frac{5}{4};\sin ^2\left (d x-\tan ^{-1}(\cot (c))\right )\right ) \sec \left (d x-\tan ^{-1}(\cot (c))\right ) \sqrt{1-\sin \left (d x-\tan ^{-1}(\cot (c))\right )} \sqrt{-\sqrt{\cot ^2(c)+1} \sin (c) \sin \left (d x-\tan ^{-1}(\cot (c))\right )} \sqrt{\sin \left (d x-\tan ^{-1}(\cot (c))\right )+1} \sec ^2\left (\frac{c}{2}+\frac{d x}{2}\right )}{3 d \sqrt{\cot ^2(c)+1}}\right ) \]
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
Maple [B] time = 3.14, size = 355, normalized size = 3.5 \begin{align*} -{\frac{2\,a}{15\,d}\sqrt{ \left ( 2\, \left ( \cos \left ( 1/2\,dx+c/2 \right ) \right ) ^{2}-1 \right ) \left ( \sin \left ({\frac{dx}{2}}+{\frac{c}{2}} \right ) \right ) ^{2}} \left ( -24\,B\cos \left ( 1/2\,dx+c/2 \right ) \left ( \sin \left ( 1/2\,dx+c/2 \right ) \right ) ^{6}+ \left ( 20\,A+44\,B \right ) \left ( \sin \left ({\frac{dx}{2}}+{\frac{c}{2}} \right ) \right ) ^{4}\cos \left ({\frac{dx}{2}}+{\frac{c}{2}} \right ) + \left ( -10\,A-16\,B \right ) \left ( \sin \left ({\frac{dx}{2}}+{\frac{c}{2}} \right ) \right ) ^{2}\cos \left ({\frac{dx}{2}}+{\frac{c}{2}} \right ) +5\,A\sqrt{ \left ( \sin \left ( 1/2\,dx+c/2 \right ) \right ) ^{2}}\sqrt{2\, \left ( \sin \left ( 1/2\,dx+c/2 \right ) \right ) ^{2}-1}{\it EllipticF} \left ( \cos \left ( 1/2\,dx+c/2 \right ) ,\sqrt{2} \right ) -15\,A\sqrt{ \left ( \sin \left ( 1/2\,dx+c/2 \right ) \right ) ^{2}}\sqrt{2\, \left ( \sin \left ( 1/2\,dx+c/2 \right ) \right ) ^{2}-1}{\it EllipticE} \left ( \cos \left ( 1/2\,dx+c/2 \right ) ,\sqrt{2} \right ) +5\,B\sqrt{ \left ( \sin \left ( 1/2\,dx+c/2 \right ) \right ) ^{2}}\sqrt{2\, \left ( \sin \left ( 1/2\,dx+c/2 \right ) \right ) ^{2}-1}{\it EllipticF} \left ( \cos \left ( 1/2\,dx+c/2 \right ) ,\sqrt{2} \right ) -9\,B\sqrt{ \left ( \sin \left ( 1/2\,dx+c/2 \right ) \right ) ^{2}}\sqrt{2\, \left ( \sin \left ( 1/2\,dx+c/2 \right ) \right ) ^{2}-1}{\it EllipticE} \left ( \cos \left ( 1/2\,dx+c/2 \right ) ,\sqrt{2} \right ) \right ){\frac{1}{\sqrt{-2\, \left ( \sin \left ( 1/2\,dx+c/2 \right ) \right ) ^{4}+ \left ( \sin \left ({\frac{dx}{2}}+{\frac{c}{2}} \right ) \right ) ^{2}}}} \left ( \sin \left ({\frac{dx}{2}}+{\frac{c}{2}} \right ) \right ) ^{-1}{\frac{1}{\sqrt{2\, \left ( \cos \left ( 1/2\,dx+c/2 \right ) \right ) ^{2}-1}}}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int{\left (B \cos \left (d x + c\right ) + A\right )}{\left (a \cos \left (d x + c\right ) + a\right )} \sqrt{\cos \left (d x + c\right )}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F] time = 0., size = 0, normalized size = 0. \begin{align*}{\rm integral}\left ({\left (B a \cos \left (d x + c\right )^{2} +{\left (A + B\right )} a \cos \left (d x + c\right ) + A a\right )} \sqrt{\cos \left (d x + c\right )}, x\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]